package cn.wolfcode.p2p.base.query;

import lombok.Getter;
import lombok.Setter;
import org.springframework.util.StringUtils;

@Getter@Setter
public class QueryObject {
        private Integer currentPage=1;
        private Integer pageSize=10;
        public Integer getStart(){
                return (currentPage-1)*pageSize;
        }
        private String orderBy;
        public String getOrderBy(){
                return StringUtils.hasLength(orderBy)?orderBy:null;
        }
}
